# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-optuna
_pkgorig=optuna
pkgver=3.5.0
pkgrel=0
pkgdesc="Hyperparameter optimization framework"
url="https://optuna.org"
arch="noarch"
license="MIT"
depends="
	python3
	py3-alembic
	py3-colorlog
	py3-cmaes
	py3-numpy
	py3-packaging
	py3-scipy
	py3-sqlalchemy
	py3-tqdm
	py3-yaml
	"
checkdepends="
	python3-dev
	"
makedepends="
	py3-gpep517
	py3-setuptools
	py3-wheel
	"
subpackages="$pkgname-pyc"
source="https://github.com/optuna/optuna/archive/v$pkgver/$_pkgorig-$pkgver.tar.gz"
builddir="$srcdir/optuna-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

# several test dependencies are missing | use smoke tests now
check() {
	PYTHONPATH=build/lib python3 -c "import optuna"
}

package() {
	python3 -m installer --destdir="$pkgdir" .dist/*.whl
}

sha512sums="
0ebccd71b3b02ac0c8c2deedc2cf55c7ba58b82fe4af77a4a64b356d9aa8b7920291c05449962c4bfe2d5eaaee11a010030d7eda9806ffc965a8a35201e676a7  optuna-3.5.0.tar.gz
"
